<template>
	<view class="form-main1">
	  <view class="part1">
	    <!--					< view class="operate-record" >-->
	
      <view class="row-wrapper">
        <view class="whole-part">
          <view class="row-name">客户编号</view>
          <view class="input-wrapper">
            <view class="uni-input" @click="copy(item &&item.no)">{{item &&item.no||'暂无'}}</view>
          </view>
        </view>
      </view>
      <view class="row-wrapper">
        <view class="whole-part">
          <view class="row-name"><text v-if="(item &&item.buyer_type)==2">公司名称</text><text v-else>客户姓名</text></view>
          <view class="input-wrapper">
            <view class="uni-input" @click="copy(item &&item.no)">{{item && item.user_name}}</view>
          </view>
        </view>
      </view>
        <view class="row-wrapper"  v-if="item&&item.status!=0">
          <view class="whole-part">
            <view class="row-name"><text v-if="(item &&item.buyer_type)==2">营业执照</text><text v-else>身份证</text></view>
            <view class="input-wrapper">
              <view class="uni-input" @click="copy(item &&item.no)">{{item && item.number_id}}</view>
            </view>
          </view>
        </view>
	
	    <view class="row-wrapper">
	      <view class="left-part">
	        <view class="row-name">客户分组</view>
	        <view class="input-wrapper">
	          <view class="uni-input">{{getintent_client(item && item.intent_client)}}</view>
	          <view class="input-wrapper"></view>
	        </view>
	      </view>
		  <view class="left-part">
		    <view class="row-name">客户关系</view>
		    <view class="input-wrapper">
		      <view class="uni-input">{{getstatus( item && item.status)}}</view>
		    </view>
		  </view>
	    </view>
      <view class="row-wrapper">
        <view class="left-part">
          <view class="row-name">常用手机号</view>
          <view class="input-wrapper">
            <view class="uni-input">{{item && item.phone}}</view>
            <view class="input-wrapper"></view>
          </view>
        </view>
      <view class="left-part">
        <view class="row-name">备用手机号</view>
        <view class="input-wrapper">
          <view class="uni-input">{{item && item.phone_b}}</view>
        </view>
      </view>
      </view>
      <view class="row-wrapper">
        <view class="left-part">
          <view class="row-name">意向面积</view>
          <view class="input-wrapper">
            <view class="uni-input">{{item && item.intent_areas}}</view>
            <view class="input-wrapper"></view>
          </view>
        </view>
      <view class="left-part">
        <view class="row-name">意向价格</view>
        <view class="input-wrapper">
          <view class="uni-input">{{item && item.intent_price}}</view>
        </view>
      </view>
      </view>
      <view class="row-wrapper">
        <view class="left-part">
          <view class="row-name">微信号</view>
          <view class="input-wrapper">
            <view class="uni-input">{{item && item.wechat_number}}</view>
            <view class="input-wrapper"></view>
          </view>
        </view>
      <view class="left-part">
	       <view class="row-name">录入时间</view>
	       <view class="input-wrapper">
	         <view class="uni-input">{{item && item.add_time}}</view>
	         <view class="input-wrapper"></view>
	       </view>
	     </view>
      </view>
      
	    <view class="row-wrapper" v-if="item&&item.status!=0">
        <view class="left-part">
        <view class="row-name">跟进天数</view>
        <view class="input-wrapper">
          <view class="uni-input">{{followday(item && item.follow_day)}}</view>
        </view>
	     </view>
	      <view class="right-part">
	        <view class="row-name">带看情况</view>
	        <view class="input-wrapper">
	          <view class="uni-input">{{getstatus_text(item && item.status_text)}}</view>
	        </view>
	      </view>
	    </view>
      <view class="row-wrapper">
        <view class="left-part">
          <view class="row-name">备注</view>
          <view class="input-wrapper">
            <scroll-view scroll-x="true" class="uni-input ">{{item &&item.remark||'暂无'}}</scroll-view>
          </view>
        </view>
         <view class="right-part">
           <view class="row-name">客户来源</view>
           <view class="input-wrapper">
             <view class="uni-input">{{getweb(item&&item.is_web)}}</view>
           </view>
         </view>
      </view>
	    <!--					</view>-->
	  </view>
	  <!--        <view class="part2">-->
	  <!--          <view class="part2-title">推荐卖点</view>-->
	  <!--	-->
	  <!--						<u-input height="318" type="textarea" :border="true" placeholder="提炼2-3个点，输入字数不要超过140字。" />-->
	  <!--					-->
	  <!--          <button class="blue-wide-button">确定</button>-->
	
	  <!--        </view>-->
	</view>
</template>

<script>
	export default {
		data() {
			return {
			
			};
		},
		methods:{
      followday(val){
        if(val){
          return `已跟进${val}天`
        }else{
          return '暂无'
        }
      },
      copy(val){
        uni.setClipboardData({
            data: val,
            complete: function (res) {
                console.log(res);
            }
        });
      },
      getweb(val){
        if(val==0){
          return '线上'
        }else{
          return '线下'
        }
      },
			getstatus(val){
				if(val==0){
					return '公客'
				}else if(val==1){
					return '私客'
				}
			},
      getintent_type(val) {
        if (val == 1) {
          return '写字楼'
        } else if (val == 2) {
          return '公寓'
        } else if (val == 3) {
          return '商业店铺'
        } else if (val == 4) {
          return '商品房'
        } else if (val == 5) {
          return '酒店'
        }
      },
			getintent_client(val){
				if(val==1){
					return '意向客户'
				}else if(val==2){
					return '普通客户'
				}else{
					return '合作客户'
				}
			},
			getstatus_text(val){
				if(val==0){
					return '已成交'
				}else if(val==1){
					return '未完成'
				}else{
          return '暂无状态'
        }
			}
		},
		props:['item']
	}
</script>

<style lang="scss">
	@import "../assets/styles/global";
	/*@import "src/uview-ui/common/demo.scss";*/
	@import "@/uview-ui/index.scss";
	.form-main1,
	.form-main2 {
		margin-bottom: 20px;
	  width: 686rpx;
	  background-color: #ffffff;
	  border-top-left-radius: 8rpx;
	  border-top-right-radius: 8rpx;
	  padding: 30rpx;
	  @include bottomGreyBorder;
	  border-bottom-color: $blueBorderColor;
	  border-width: 4rpx;
	
	  .part1 {
	    width: 100%;
	    border-radius: 8rpx;
	    flex-direction: column;
	    display: flex;
	
	    .row-wrapper {
	      width: 100%;
	      height: 150rpx;
	      display: flex;
	      justify-content: space-between;
	      align-items: center;
	
	      .left-part,
	      .right-part,
	      .whole-part {
	        display: flex;
	        flex-direction: column;
	        justify-content: space-between;
	        width: 280rpx;
	        height: 112rpx;
	        padding-bottom: 14rpx;
	        @include bottomGreyBorder;
	
	        .row-name {
	          max-width: 250rpx;
	          @include ellipsis;
	          height: 48rpx;
	          font-size: 24rpx;
	          line-height: 48rpx;
	          color: #969799;
	          /*margin-bottom: 8rpx;*/
	        }
	
	        .input-wrapper {
	          position: relative;
	          height: 48rpx;
	          width: 100%;
	
	          .uni-input {
	            width: 100%;
	            font-size: 28rpx;
	            line-height: 48rpx;
	            color: #3d444c;
	            /*color: #969799;*/
	            @include ellipsis;
	
	          }
	
	          .triangle-down-arrow {
	            position: absolute;
	            right: 0;
	            top: 50%;
	            margin-top: -6rpx;
	            width: 12rpx;
	            height: 12rpx;
	            background-image: url("@/static/images/record/triangle-arrow@3x.png");
	            @include contain-no-repeat-center;
	          }
	        }
	      }
	
	      .whole-part {
	        width: 622rpx;
	        height: 112rpx;
	        @include bottomGreyBorder;
	
	      }
	    }
	
	    .record-progress {
	      width: 609rpx;
	      height: 114rpx;
	      border: solid 2rpx #ebedf0;
	      @include center;
	
	      .status-icon-text {
	        width: 170rpx;
	        display: flex;
	        @include center;
	        flex-direction: column;
	
	        .icon {
	          height: 38rpx;
	          width: 38rpx;
	          @include cover-no-repeat-center;
	        }
	
	        .text {
	          width: 100%;
	          @include ellipsis;
	          height: 48rpx;
	          font-size: 24rpx;
	          line-height: 48rpx;
	          letter-spacing: 0rpx;
	          color: #ba9d61;
	          text-align: center;
	        }
	
	        .inactive-text {
	          color: #969799;
	        }
	
	      }
	
	      .right-arrow {
	        height: 30rpx;
	        width: 30rpx;
	        @include contain-no-repeat-center;
	        /*background-color: #D8D8D8;*/
	      }
	
	      .active-right-arrow {
	        background-image: url("@/static/images/record/right-arrow@3x.png");
	
	      }
	
	      .inactive-right-arrow {
	        background-image: url("@/static/images/record/inactive-right-arrow@3x.png");
	
	      }
	    }
	}}
</style>
